package com.nhatviet.webservice.helpers;

public final class WikiService
{
	/* Languages */
	public static final String	LANGUAGE_EN		= "en";
	public static final String	LANGUAGE_COMMON	= "common";
	public static final String	LANGUAGE_VN		= "vi";

	/* URL common */
	public static final String	URL_END_POINT	= "https://en.wikipedia.org/w/api.php?";

	/* Format receiving file */
	/**
	 * EXtensible Markup Language
	 */
	public static final String	FORMAT_XML		= "xml";
	public static final String	FORMAT_XMLFM	= "xmlfm";
	/**
	 * JavaScript Object Notation
	 */
	public static final String	FORMAT_JSON		= "json";
	public static final String	FORMAT_JSONFM	= "jsonfm";
	/**
	 * Hypertext Preprocessor
	 */
	public static final String	FORMAT_PHP		= "php";
	public static final String	FORMAT_PHPFM	= "phpfm";

	/**
	 * Web Distributed Data eXchange
	 */
	public static final String	FORMAT_WDDX		= "wddx";
	public static final String	FORMAT_WDDXFM	= "wddxfm";

	/**
	 * Yet Another Multicolumn Layout (YAML) is a modular CSS framework for
	 * truly flexible, accessible and responsive websites
	 */
	public static final String	FORMAT_YAML		= "yaml";
	public static final String	FORMAT_YAMLFM	= "yamlfm";
	/**
	 * Normal text
	 */
	public static final String	FORMAT_TXT		= "txt";
	public static final String	FORMAT_TXTFM	= "txtfm";

	public static final String	FORMAT_DGB		= "dbg";
	public static final String	FORMAT_DBGFM	= "dbgfm";
	public static final String	FORMAT_DUMP		= "dump";
	public static final String	FORMAT_DUMPFM	= "dumpfm";

	public static final String	FORMAT_DEFAULT	= FORMAT_XMLFM;

	/**
	 * @param
	 */
	public static String getURL(String actionStr, String titleStr, String formatReceiveStr)
	{
		return URL_END_POINT + "format=" + formatReceiveStr + "&action="
				+ actionStr + "&title=" + titleStr;
	}
}
